﻿using UnityEngine;
using System.Collections;

namespace net{
	public class NetBullet : MonoBehaviour {

		public void NewBomb(int direction, Vector3 pos,GameObject tank,bool isFromPlayer){
			GameObject bullet = Network.Instantiate(Resources.Load("prefab/NetBullet"),
			                                        pos,
			                                        Quaternion.identity,0
			                                        ) as GameObject;
			
			NetBomb bomb = bullet.transform.GetComponent<NetBomb> ();
			bomb.direction = direction;
			bomb.tank = tank;
			bomb.setIsFromPlayer(isFromPlayer);
			//bomb.state = tank.transform.GetComponent<PlayerState>();

		}
	}

}